//
//  UILable+Extension.swift
//  weibo
//
//  Created by libowen on 16/5/24.
//  Copyright © 2016年 libowen. All rights reserved.
//

import UIKit

extension UILabel {
    convenience init(title: String,font: CGFloat,textColor: UIColor,alignment: NSTextAlignment = .Center) {
        self.init()
        self.text = title
        self.font = UIFont.systemFontOfSize(font)
        self.textColor = textColor
        textAlignment = alignment
        if alignment == .Left {
            preferredMaxLayoutWidth = ScreenWidth - 2 * StatusCellMargin
        }
        numberOfLines = 0
        sizeToFit()
    }
}
